package cn.readjava.service.impl;

import cn.readjava.bean.UserOrder;
import cn.readjava.dao.UserOrderDao;
import cn.readjava.service.UserOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserOrderServiceImpl implements UserOrderService {

    @Resource
    private UserOrderDao userOrderDao;

    @Override
    public UserOrder save(UserOrder userOrder) {
        return userOrderDao.save(userOrder);
    }

    public List<UserOrder> findAllByOrderUserId(Long id) {
        return userOrderDao.findAllByOrderUserId(id);
    }
}
